//
//  BRAPI.h
//  BrezzeSaaS
//
//  Created by IOS on 2021/8/30.
//  Copyright © 2021 Brezze GWG. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
 成功的block
 @param dataDict 返回的数据
 @param respCode 返回的请求码
 */
typedef void(^BRAPISucceedBlock)(NSDictionary *dataDict, NSInteger respCode);

/**
 失败的block
 @param error 错误信息
 */
typedef void(^BRAPIFailed)(NSError *error);

@interface BRAPI : NSObject

+ (NSString *)homeMain;
#pragma mark - Login --
/// 国家码列表
+ (NSString *)countryList;
/// 获取验证码
+ (NSString *)verificationCode;
/// 发送手机登录验证码（新接口）
+ (NSString *)sendMobileLoginCode;
/// 手机号验证码登录（新接口）
+ (NSString *)mobileLogin;
/// 登录接口
+ (NSString *)login;
/// token登录接口
+ (NSString *)faceIDLogin;
+ (NSString *)faceIDSave;
/// 退出登录
+ (NSString *)logout;
/// 系统配置
+ (NSString *)configs;
/// 获取平台列表
+ (NSString *)platforms;
/// 选择平台
+ (NSString *)platformSwitch;
/// app版本
+ (NSString *)appVersion;

#pragma mark - 首页 网点--
/// 附近网点 /{lng}/{lat}
+ (NSString *)stationNear;
/// 附近网点 V2（新接口）
/// @param lng 经度
/// @param lat 纬度
/// @param distance 距离（公里）
/// @param total 总数
+ (NSString *)stationNearV2:(CGFloat)lng lat:(CGFloat)lat distance:(NSInteger)distance total:(NSInteger)total;
/// 网点详情 /{id}/{lng}/{lat}
+ (NSString *)stationDetail;
/// 网点详情 V2（新接口）
/// @param siteId 站点ID
/// @param distance 距离（公里）
+ (NSString *)stationDetailV2:(NSInteger)siteId distance:(CGFloat)distance;

#pragma mark - 用户信息 --
/// 用户信息
+ (NSString *)userInfo;
/// 获取用户信息（新接口）
+ (NSString *)userCenterInfo;
/// 信息编辑
+ (NSString *)editUserInfo;
/// 修改昵称（新接口）
+ (NSString *)editNickname;
/// 上报切换语言（已废弃）
//+ (NSString *)languageSwitch:(NSString *)la;

#pragma mark - 钱包 --
/// 获取钱包信息
+ (NSString *)getWallet;
/// 用户流水
/// @param offset 偏移量
+ (NSString *)userTransfer:(NSInteger)offset;
/// 设置默认卡 DELETE
+ (NSString *)defaultCard;
/// 删除卡片 PUT
/// @param cardID 卡ID
+ (NSString *)deleteCard:(NSString *)cardID;
/// 可支付卡列表
+ (NSString *)cardPayList:(NSInteger)type amount:(CGFloat)amount;
/// 判断可不可退押金
+ (NSString *)checkRefund;
/// 押金退款 
+ (NSString *)refundDeposit;

#pragma mark - Merchant 接口 --
/// 商户列表
+ (NSString *)merchantList;
/// 商户中心首页
+ (NSString *)merchant;
/// 商家-提现接口
+ (NSString *)withdrawalAmount;
/// 商家-获取提现账户
+ (NSString *)withdrawalAccount;
/// 商家-租借订单
+ (NSString *)merchantRentOrder;
/// 商家-交易记录
+ (NSString *)merchantBrokerages;
/// 商家-交易统计
+ (NSString *)merchantBrokeragesNum;
/// 商家-提现记录
+ (NSString *)recordWithdraws;
/// 商家-编辑、获取
+ (NSString *)shopInfo;
/// 商家-我的设备
+ (NSString *)myDevices;
/// 行业分类
+ (NSString *)indutstry;
/// 验证手机号、邮箱
+ (NSString *)checkCurrAccount;
/// 商家邀请链接
+ (NSString *)shopInvite:(NSString *)ciphertext;
#pragma mark - 支付 --
/// 支付方式
+ (NSString *)paymentMrthod:(NSNumber *)type amount:(NSNumber *)amount;
/// 支付
+ (NSString *)pay;
/// 绑定 银行卡
+ (NSString *)bankcaerd;
/// 购买计算金额
+ (NSString *)payPriceCalculate;

#pragma mark - 订单 --
/// 首页进行中的订单-或未支付订单
+ (NSString *)orderIng;
/// 判断可否租借
+ (NSString *)canRent;
/// 计费规则
+ (NSString *)orderBilling;
/// 机柜详情 V2（新接口）
/// @param deviceId 设备ID
+ (NSString *)rentboxShowV2:(NSString *)deviceId;
/// 弹充电宝接口
/// @param deviceId 设备ID
+ (NSString *)rentboxPopup:(NSString *)deviceId;
/// 预授权
+ (NSString *)preRent;
/// ZaloPay押金支付 - 创建订单
/// @param deviceId 设备ID
/// @param powerBankType 充电宝类型，默认0
+ (NSString *)createZaloPayOrder:(NSString *)deviceId powerBankType:(NSInteger)powerBankType;
/// MoMoPay押金支付 - 创建订单
/// @param deviceId 设备ID
/// @param powerBankType 充电宝类型，默认0
+ (NSString *)createMoMoPayOrder:(NSString *)deviceId powerBankType:(NSInteger)powerBankType;
/// 检查支付订单状态
/// @param orderUuid 订单UUID
+ (NSString *)checkPayOrder:(NSString *)orderUuid;
/// 获取押金支付配置
/// @param powerBankType 充电宝类型，默认0
+ (NSString *)getSecurityPayConfig:(NSInteger)powerBankType;

/// 轮巡获取租借结果
+ (NSString *)rentResult:(NSString *)orderNo;
/// 订单 列表
/// @param offset 偏移量0
+ (NSString *)OrderList:(NSInteger)offset;
/// 订单列表（新接口）
+ (NSString *)orderListV2;
/// 置换订单列表
/// @param offset 偏移量0
+ (NSString *)swapList:(NSInteger)offset;
/// 订单详情
/// @param orderNo 订单编号
+ (NSString *)OrderDetail:(NSString *)orderNo;
/// 订单详情 V2（新接口）
/// @param orderId 订单ID
+ (NSString *)OrderDetailV2:(NSInteger)orderId;
/// 订单详情 置换
+ (NSString *)OrderSwapDetail:(NSString *)orderNo;
/// 租借
/// @param cabinetNo 机柜号
+ (NSString *)rent:(NSString *)cabinetNo;
/// 发送收据
+ (NSString *)receipts;
/// 报失确认
+ (NSString *)lostSum:(NSString *)orderNo;

#pragma mark - reward 接口 --
/// 优惠券列表
+ (NSString *)couponsList;
/// 我的优惠券
+ (NSString *)myCouponsList;
/// 我的优惠码
+ (NSString *)myPromoList;
/// 积分兑换优惠券
+ (NSString *)redeemCoupons;
/// 获取订单可用优惠券
+ (NSString *)orderCoupons;
/// 我的积分
+ (NSString *)myPoints;
/// 积分历史
+ (NSString *)pointHistory;
/// 积分规则
+ (NSString *)pointRule;

/// 促销码兑换
+ (NSString *)promoCodeRedeem;
/// 促销码记录
+ (NSString *)promoCodeHistory;

/// 邀请码填写
/// @param code 邀请码
+ (NSString *)inviteCode:(NSString *)code;
/// 邀请奖励
+ (NSString *)inviteReward;
/// 邀请历史
+ (NSString *)inviteHistory;
/// 充点卡-列表
+ (NSString *)chargeCards;
/// 充点卡-我的
+ (NSString *)chargeCardsMy;
/// 兑换指定的优惠券、充点卡
+ (NSString *)codeScanRedeem;

#pragma mark - FAQ --
/// FAQ列表
+ (NSString *)faqList;
/// 反馈
+ (NSString *)feedback;
/// 反馈并退款
+ (NSString *)feedbackSwap;
/// 报损
+ (NSString *)reportDamage;
/// 订单未归还
+ (NSString *)reportOrderProblem;
/// 上报前查询当前订单状态
/// @param order 订单号
+ (NSString *)checkOrder:(NSString *)order;
/// 文件上传
+ (NSString *)filesUpload;
+ (NSString *)filesDownload;
+ (NSString *)filesDelete;

#pragma mark - 上传、下载 --
// TODO: 暂时注释掉上传、下载、删除功能，当前app不需要这些功能
/// 上传请求，参数使用 'imageParams、videoParams'
+ (void)uploadFiles:(NSData *)data beginBlock:(void(^)(void))beginBlock successBlock:(void(^)(NSURLSessionDataTask *_Nonnull task,id _Nullable responseObject))successBlock failureBlock:(void(^)(NSURLSessionDataTask *_Nullable task, NSError *_Nonnull error))failureBlock;

+ (void)requestUpLoadImgHttpWithData:(NSData *)data AndType:(NSString *)type BeginBlock:(void(^)(void))beginBlock SuccessBlock:(void(^)(NSURLSessionDataTask *_Nonnull task,id _Nullable responseObject))successBlock FailureBlock:(void(^)(NSURLSessionDataTask *_Nullable task, NSError *_Nonnull error))failureBlock;

#pragma mark - 下载视频
/**
 下载视频
 @param urlStr 路径
 */
+ (void)requestDownloadWithUrlstring:(NSString *)urlStr;

//文件-删除
+ (void)requestDeleteWithUrlstring:(NSString *)urlStr succeed:(BRAPISucceedBlock)succeed failed:(BRAPIFailed)failed;

@end

NS_ASSUME_NONNULL_END
